package com.ddtech.business.train.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ddtech.business.train.entity.TrainPlan;
import com.ddtech.business.train.query.TrainPlanQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * <p>
 * 培训计划表 Mapper 接口
 * </p>
 *
 * @author bin_pu
 * @since 2023-02-06
 */
@Mapper
public interface TrainPlanMapper extends BaseMapper<TrainPlan> {

    /**
     * 查询个人未完成培训任务
     * @param page
     * @param trainPlanQuery
     * @return
     */
    IPage<Map<String, Object>> getMyTrainPlanList(IPage page, @Param("trainPlanQuery") TrainPlanQuery trainPlanQuery);

    Map<String,Object> getMyTrainPlanTotal(@Param("trainPlanQuery") TrainPlanQuery trainPlanQuery);

    Map<String,Object> getMyTaskTotal(@Param("trainPlanQuery") TrainPlanQuery trainPlanQuery);

    /***
     * description:查询课程详情
     * @param:  * @param id
     * @date: 2023-05-26
     * @return: java.util.Map<java.lang.String,java.lang.Object>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    Map<String, Object> getTrainInfo(String id);

    /***
     * description: 获取培训课程评分
     * @param:  * @param id
     * @date: 2023-06-02
     * @return: java.util.Map<java.lang.String,java.lang.Object>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    Map<String, Object> getTrainScoure(String id);

    /**
     * 获取完成情况
     * @param id
     * @return
     */
    Map<String, Long> getFinishCount(@Param("id") String id);
}
